﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    exclude-result-prefixes="msxsl">

  <xsl:output method="html" indent="yes"/>
<!--
  <xsl:template name="prevNextPage.body">
    <xsl:param name="Page" />
    <xsl:for-each select="$Page">
      <xsl:call-template name="pagePrevNext.rowview" />
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="pagePrevNext.rowview">
    <td>
      <span class="srch-Page">
        <a href="{Url}">
          <xsl:value-of select="Text" />
        </a>
      </span>
    </td>
  </xsl:template>
  -->

  <xsl:template name="page.body">
    <xsl:param name="Rows" />
    <xsl:for-each select="$Rows">
      <xsl:call-template name="page.rowview" />
    </xsl:for-each>
  </xsl:template>

  <xsl:template name="page.rowview">
      <a href="{Url}">
        <xsl:choose>
          <xsl:when  test="@isCurrent = string('true')" >
            <xsl:attribute name="class">is_current</xsl:attribute>
          </xsl:when>
          <xsl:when test="@isNextPage = string('true')">
            <xsl:attribute name="class">paging_nextPage</xsl:attribute>
          </xsl:when>
          <xsl:when test="@isPrevPage = string('true')">
            <xsl:attribute name="class">paging_prevPage</xsl:attribute>
          </xsl:when>
          <xsl:when test="@isFirstPage = string('true')">
            <xsl:attribute name="class">paging_firstPage</xsl:attribute>
          </xsl:when>
          <xsl:otherwise>
            <xsl:attribute name="class"></xsl:attribute>
          </xsl:otherwise>
        </xsl:choose>
        <xsl:text xml:space="preserve" > </xsl:text>
        <xsl:choose>
          <xsl:when  test="@isCurrent = string('true')" >
            <b>
              <xsl:value-of select="Text" />
            </b>
          </xsl:when>
          <xsl:otherwise>
            <xsl:value-of select="Text" />
          </xsl:otherwise>
        </xsl:choose>
      </a>
  </xsl:template>

  <xsl:template match="/Pagination">
    <STYLE>
      /*Default styles from Microsoft
      You can uncomment and add new style if needed for this web part only here
      or globally by changing the master template */

/*
      .srch-Page {
      background-color:#ECECEC;
      color:#666666;
      font-family:Tahoma;
      font-size:1em;
      font-weight:bold;
      text-align:right;
      }
      .srch-Page a:link, .srch-Page a:visited {
      color:#3764A0;
      font-weight:normal;
      text-decoration:none;
      }
      .srch-Page a:hover {
      color:#FF0000;
      }
      .srch-dup a:link, .srch-dup a:visited {
      color:#517ACC;
      }
*/

    </STYLE>

    <div id="SRP" class="srch-WPBody ">
      <div class="srch-Page srch-Page-bg" >
        <xsl:variable name="Rows" select="/Pagination/Pages/Page" />
        <xsl:call-template name="page.body">
          <xsl:with-param name="Rows" select="$Rows" />
        </xsl:call-template>
      </div>
    </div>
  </xsl:template>

</xsl:stylesheet>
